<script setup>
import {ref, onMounted} from "vue";
import {getSigningList} from "@/apis/signin";
import {useRouter} from "vue-router";


const router = useRouter();
const signingList = ref([])
onMounted(() => {
  getSigningList()
      .then(res => {
        const {code, data} = res.data;
        if (code === 1) {
          signingList.value = data;
        }
      })
})

function handleSignin(id) {
  router.push({name: "signin", params: {id: id}})
}

</script>

<template>
  <main>
    <t-cell-group>
      <t-cell v-for="(item, index) in signingList" :key="index" :title="item.title" :note="item.content"
              @click="handleSignin(item.id)" hover />
    </t-cell-group>
  </main>
</template>

<style scoped lang="less">

</style>